<?php
/**
 * 插件后台程序
 *
 * Copyright (c) 2013 YinHailin All rights reserved.
 * @Author: YinHailin
 * @Authorize: Boren Network
 * @Created by YinHailin at 2013-11-20
 */

class Tips extends PublicMod {

  /* 小提示处理程序 */
  public function GetTips($key, $data) {
    //若该项无提示，则随机产生一条系统提示
    $identifier = defined('PLUGIN_NAME') ? PLUGIN_NAME.'_'.ACTION_NAME : MODULE_NAME.'_'.ACTION_NAME;
    $data = plugin_info('tips', parse_name($identifier));
    if (empty($data)) {
      $data = plugin_info('tips', 'tips');
      $key = array_rand($data);
      $data = array($data[$key]);
    }
    $this->Assign('tips', $data);

    $this->Plugin();
  }
}